package rudia.org.daumsearch.web;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import rudia.org.core.Rudia;
import rudia.org.daumsearch.service.MainService;

@Controller
public class MainController {

	@Resource(name = "mainService")
	private MainService mainService;

	@RequestMapping("/main.do")
	public String form(HttpServletRequest request) throws InterruptedException {
		Rudia.log.debug("=========MainCont====");


		mainService.list();
		return "main";
	}

	@RequestMapping("/daummap.do")
	public String google(HttpServletRequest request) throws Exception {
		Rudia.log.debug("=========Daum====");

		String qry = "자동차 정비";
		mainService.callDaumMap(qry);
		return "main";
	}
}
